<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的快件 -- 快件e栈服务平台</title>
<meta content="width=device-width,initial-scale=1,maximum-scale=1" name="viewport">
<style type="text/css">
	body{
		margin: 0;
		padding: 0;
		background-color: #eeeeee;
		font-family: "楷体";
	}
	.item{
		margin: 20px;
		margin-bottom: 50px;
	}
	.imte_top{
		text-align: center;
	}
	.imte_top>span{
		font-size:14px;
		display: inline-block;
		padding: 5px 12px;
		background-color: #ddd;
		color:#fff;
		border-radius: 5px;
	}
	.item_content{
		background-color: #fff;
		padding: 25px 15px;
		margin-top: 6px;
	}
	.item_content_top_1{
		font-size: 24px;
		font-weight: bold;
	}
	.item_content_top_2{
		color:#eee;
		font-size: 14px;
		margin: 5px 0px;
	}
	.item_content_top_3{
		margin: 10px 0px;
	}
	.item_content_top_4{
		margin: 10px 0px;
	}
	.item_content_bottom>a{
		text-decoration: none;
		color:#33e;
	}
</style>
</head>
<body>
	
	<div class="content" id="status0">
				
		<!--<div class="item">-->
		<!--	<div class="imte_top"><span>2019-10-12 12:00</span></div>-->
		<!--	<div class="item_content">-->
		<!--		<div class="item_content_top">-->
		<!--			<div class="item_content_top_1">取件通知</div>-->
		<!--			<div class="item_content_top_2">2019-10-12 12:00</div>-->
		<!--			<div class="item_content_top_3">您有一个包裹到e栈了!</div>-->
		<!--			<div class="item_content_top_4">-->
		<!--				取件码:<span style="color:#05a">123123</span><br>-->
		<!--				快递公司:顺丰快递<br>-->
		<!--				运单号码:123123123213<br>-->
		<!--				站点电话:13843838438<br>-->
		<!--				取件地址:学校快件集散中心<br>-->
		<!--			</div>-->
		<!--		</div>-->
		<!--		<hr>-->
		<!--		<div class="item_content_bottom">-->
		<!--			<a href="personQRcode.jsp?code=<%=e.getCode()%>">二维码</a>-->
		<!--		</div>-->
		<!--	</div>-->
		<!--</div>-->
		
	</div>
	<div class="content" id="status1">
		
				
		<!--<div class="item">-->
		<!--	<div class="imte_top"><span>2019-10-12 12:00</span></div>-->
		<!--	<div class="item_content">-->
		<!--		<div class="item_content_top">-->
		<!--			<div class="item_content_top_1">取件成功通知</div>-->
		<!--			<div class="item_content_top_2">2019-10-12 12:00</div>-->
		<!--			<div class="item_content_top_3">您有一个包裹从e栈取出了!</div>-->
		<!--			<div class="item_content_top_4">-->
		<!--				快递公司:顺丰快递<br>-->
		<!--				运单号码:12313431123<br>-->
		<!--				站点电话:13843838438<br>-->
		<!--			</div>-->
		<!--		</div>-->
		<!--		<hr>-->
		<!--		<div class="item_content_bottom">-->
		<!--			<a href="#">有疑问 ? 点了也没用</a>-->
		<!--		</div>-->
		<!--	</div>-->
		<!--</div>-->
		
			
	</div>
</body>
<script src="../js/jquery.min.js"></script>
<script src="../js/layer/layer.js"></script>
<script>
	$(function(){
		var windowId = layer.load();
		$.getJSON("/wx/findExpressAll.do",null,function(rs){
			layer.close(windowId);

			if (rs.status == 2){
				var item = "<div class=\"item\">\n" +
						"\t\t\t<div class=\"imte_top\"><span>"+rs.data.intime+"</span></div>\n" +
						"\t\t\t<div class=\"item_content\">\n" +
						"\t\t\t\t<div class=\"item_content_top\">\n" +
						"\t\t\t\t\t<div class=\"item_content_top_1\">快件信息</div>\n" +
						"\t\t\t\t\t<div class=\"item_content_top_2\">"+rs.data.intime+"</div>\n" +
						"\t\t\t\t\t<div class=\"item_content_top_3\">单号:"+rs.data.number+"</div>\n" +
						"\t\t\t\t\t<div class=\"item_content_top_4\">\n" +
						"\t\t\t\t\t\t取件码:<span style=\"color:#05a\">"+rs.data.code+"</span><br>\n" +
						"\t\t\t\t\t\t快递公司:"+rs.data.company+"<br>\n" +
						"\t\t\t\t\t\t运单号码:"+rs.data.number+"<br>\n" +
						"\t\t\t\t\t\t站点电话:"+rs.data.sysPhone+"<br>\n" +
						"\t\t\t\t\t</div>\n" +
						"\t\t\t\t</div>\n" +
						"\t\t\t</div>\n" +
						"\t\t</div>";
				$("#status0").append($(item));
			}

			// {"status":0,"data":{
			// "status0":[{"id":103,"number":"332123","username":"123123","userphone":"123123","company":"爱沙尼亚邮政","code":"504673","intime":"2021-05-25 16:42:42","outtime":"未出库","status":"待取件","sysPhone":"18888888888"},{"id":104,"number":"7755","username":"123123","userphone":"123123","company":"顺丰速运","code":"884338","intime":"2021-05-25 17:04:07","outtime":"未出库","status":"待取件","sysPhone":"18888888888"}],
			// "status1":[{"id":109,"number":"122232","username":"柏竹1","userphone":"123123","company":"澳大利亚邮政","code":"已取件","intime":"2021-05-13 09:46:45","outtime":"2021-05-30 09:46:50","status":"已取件","sysPhone":"18888888888"},{"id":106,"number":"1231234","username":"柏竹4","userphone":"123123","company":"阿根廷邮政","code":"已取件","intime":"2021-05-30 08:17:12","outtime":"2021-05-28 09:44:17","status":"已取件","sysPhone":"18888888888"}]}}
			if(rs.status == 0){
				var data0 = rs.data.status0;
				for (let i = 0; i < data0.length; i++) {
					var item = "<div class=\"item\">\n" +
							"\t\t\t<div class=\"imte_top\"><span>"+data0[i].intime+"</span></div>\n" +
							"\t\t\t<div class=\"item_content\">\n" +
							"\t\t\t\t<div class=\"item_content_top\">\n" +
							"\t\t\t\t\t<div class=\"item_content_top_1\">取件通知</div>\n" +
							"\t\t\t\t\t<div class=\"item_content_top_2\">"+data0[i].intime+"</div>\n" +
							"\t\t\t\t\t<div class=\"item_content_top_3\">您有一个包裹到e栈了!</div>\n" +
							"\t\t\t\t\t<div class=\"item_content_top_4\">\n" +
							"\t\t\t\t\t\t取件码:<span style=\"color:#05a\">"+data0[i].code+"</span><br>\n" +
							"\t\t\t\t\t\t快递公司:"+data0[i].company+"<br>\n" +
							"\t\t\t\t\t\t运单号码:"+data0[i].number+"<br>\n" +
							"\t\t\t\t\t\t站点电话:"+data0[i].sysPhone+"<br>\n" +
							"\t\t\t\t\t</div>\n" +
							"\t\t\t\t</div>\n" +
							"\t\t\t\t<hr>\n" +
							"\t\t\t\t<div class=\"item_content_bottom\">\n" +
							"\t\t\t\t\t<a href=\"/wx/createQRCode.do?type=express&code="+data0[i].code+"\">二维码</a>\n" +
							"\t\t\t\t</div>\n" +
							"\t\t\t</div>\n" +
							"\t\t</div>";
					$("#status0").append($(item));
				}

				var data1 = rs.data.status1;
				for (let i = 0; i < data1.length; i++) {
					var item = "<div class=\"item\">\n" +
							"\t\t\t<div class=\"imte_top\"><span>"+data1[i].outtime+"</span></div>\n" +
							"\t\t\t<div class=\"item_content\">\n" +
							"\t\t\t\t<div class=\"item_content_top\">\n" +
							"\t\t\t\t\t<div class=\"item_content_top_1\">取件成功通知</div>\n" +
							"\t\t\t\t\t<div class=\"item_content_top_2\">"+data1[i].outtime+"</div>\n" +
							"\t\t\t\t\t<div class=\"item_content_top_3\">您有一个包裹从e栈取出了!</div>\n" +
							"\t\t\t\t\t<div class=\"item_content_top_4\">\n" +
							"\t\t\t\t\t\t快递公司:"+data1[i].company+"<br>\n" +
							"\t\t\t\t\t\t运单号码:"+data1[i].number+"<br>\n" +
							"\t\t\t\t\t\t站点电话:"+data1[i].sysPhone+"<br>\n" +
							"\t\t\t\t\t</div>\n" +
							"\t\t\t\t</div>\n" +
							"\t\t\t\t<hr>\n" +
							"\t\t\t\t<div class=\"item_content_bottom\">\n" +
							"\t\t\t\t\t<a href=\"#\">有疑问 ? 点了也没用</a>\n" +
							"\t\t\t\t</div>\n" +
							"\t\t\t</div>\n" +
							"\t\t</div>";
					$("#status1").append($(item));
				}

			}else{
				if (rs.status == 1){
					layer.msg(rs.result,function (){});
					setTimeout(function(){},2000);
					window.location.href= "/wx/index.html";
				}else{
					if (rs.status < 0){
						layer.msg(rs.result,function (){});
						setTimeout(function(){},2000);
						window.location.href= "/wx/login.html";
					}
				}
			}
		});
	});
</script>
</html>